<% content_for :sidebar do %>
  <%= sidebar_button_link 'Edit Cert', edit_cert_path(@cert) unless cannot? :edit, @cert %>
<% end %>

<p>
  <h2>
  <%= link_to @cert.person.fullname, @cert.person unless @cert.person.blank? %>
  </h2>
</p>

<p>
  <h2>
  <%= link_to @cert.course.name, @cert.course unless @cert.course.blank? %>
  </h2>
</p>

<p>

  <div class="alert alert-<%= @cert.status.to_s == 'Active' ? "success" : "danger" %>">
   <b>Status:</b> <%= @cert.status %>
  </div>
</p>

<p>
  <b>Category:</b>
  <%= @cert.course.category unless @cert.course.blank? %>
</p>

<p>
  <b>Level:</b>
  <%= @cert.level %>
</p>

<p>
  <b>Id number:</b>
  <%= @cert.cert_number %>
</p>

<p>
  <b>Date issued:</b>
  <%= @cert.issued_date %>
</p>

<p>
  <b>Date expires:</b>
  <%= @cert.expiration_date %>
</p>
<%= image_tag @cert.certification_url.to_s unless @cert.certification_url.blank? %>

<p>
  <b>Comments:</b>
  <%= @cert.comments %>
</p>
